package manyText;
//判断数组中的偶数和奇数
public class arry {
    public static void main(String[] args) {
        int[] arr1 = {1, 2, 3, 4};//ctrl+alt+T,快捷键可以快速生成方法，如for,while....
        //arr1.fori  :  输入，可以快捷生成arr1数组的for循环
        for (int i = 0; i < arr1.length; i++) {
/*            if (arr1[i] % 2 == 0) {
                arr1[i] *= 2;
            } else {
                arr1[i]-=1;
            }
            System.out.println(arr1[i]);*/
            if (arr1[i] % 2 == 0) {
                System.out.println(arr1[i]+"是偶数");
            } else {
                System.out.println(arr1[i]+"是奇数");
            }
        }
    }
}
